﻿Public Class frmTest
    Private WithEvents hwInf As New clsHWInfo
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        hwInf.InitOHM()
    End Sub

    Private Sub hwInf_HardWareAdded(ByVal hw As OpenHardwareMonitor.Hardware.IHardware) Handles hwInf.HardWareAdded
        With hw
            rt.Text &= "Detected: " & .Name & vbNewLine
            rt.Text &= "Identifier: " & .Identifier.ToString & vbNewLine
            rt.Text &= "HW type: " & .HardwareType.ToString & vbNewLine

        End With
    End Sub
End Class